package multithread;

public class InstanceVariableInitializer {  

	//分别是 实例变量初始化、实例代码块初始化 以及 构造函数初始化。
	
	
    private int i = 1;  //1直接赋值  超类构造之后本身之前
    private int j = i + 1;  

    public InstanceVariableInitializer(int var){//3
        System.out.println(i);
        System.out.println(j);
        this.i = var;
        System.out.println(i);
        System.out.println(j);
    }

    {               // 2实例代码块
        j += 3; 

    }//构造之前

    public static void main(String[] args) {
        new InstanceVariableInitializer(8);
    }
}